package marchsoft.modules.tiku.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import marchsoft.base.IBasicService;
import marchsoft.modules.tiku.entity.EStudent;
import marchsoft.modules.tiku.entity.dto.EStudentQueryCriteria;
import marchsoft.modules.tiku.entity.dto.StudentDto;
import marchsoft.modules.tiku.entity.dto.StudentExcel;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;


/**
 * <p>
 * 学生基本信息表 服务类
 * </p>
 *
 * @author wjy
 * @since 2022-03-29
 */

public interface IEStudentService extends IBasicService<EStudent> {


    Long findStudentIdByStudentNumAndDeptId(String username,Long deptId);

    void addStudent(EStudent eStudent);

    IPage<StudentDto> findStudent(IPage<EStudent> buildPage, EStudentQueryCriteria criteria);

    void updateOrCreateStudent(EStudent student);


    /**
     * Description:
     * 导出queryAll的数据
     *
     * @param queryAll: 待到处数据
     * @param response: 服务器响应对象
     * @throws IOException io异常
     * @author zmm
     * @date 2022/04/18
     **/
    void download(List<StudentDto> queryAll, HttpServletResponse response) throws IOException;

    /**
     * Description:
     * 根据criteria条件和isQuery查询
     * todo isQuery的作用
     *
     * @param criteria : Dept查询条件
     * @param isQuery :  是否判断当前用户数据权限
     * @return java.util.List<marchsoft.modules.system.entity.dto.DeptDTO>
     * @author wjy
     * @date 2022/4/18
     **/
    List<StudentDto> queryAll(EStudentQueryCriteria criteria, Boolean isQuery);

    /**
     *
     * @param cachedDataList
     */
    void addExcel(List<StudentExcel> cachedDataList);

}